{% extends "base.html" %}
{% block title %}Leer Artefactos{% endblock %}
{% block head %}Leer Artefactos{% endblock %}
{% block content %}
{% if show_art_list %}
{% include "artefacto_list.html" %}
<br>
<input type="button" name="load" value="Volver a M&oacute;dulo de Desarrollo" onClick='location.href="/dev_page/?proyectoname={{proyname|urlencode}}"'>
{% else %}
<style type="text/css">
label { vertical-align: top; }
input.sub_btn { 
	background-color:#E7E7E7; 
}
#portadj {
    width: 500px;
    height: 300px;
    border: 1px solid #484848;
    margin: 0 auto;
}
</style>
<script type='text/javascript'>
function spoiler(sObj)
{
	var sRef = sObj.parentNode.nextSibling;
	if (sRef.nodeType != 1)
		sRef = sRef.nextSibling;
		
	if (sRef.className == "hide")
	{
		sObj.value = "Esconder";
		sRef.className = "s_top";
	}
	else
	{
		sObj.value = "Mostrar";
		sRef.className = "hide";
	}
}

</script>
<div class="spoiler">
    <div class="spoiler_title">Caracter&iacute;sticas: <input type="button" value="Esconder"onclick="spoiler(this);" class="sub_btn"></div>
	<div class="s_top">
	<div id="impact">
        <p><b>C&aacute;lculo de impacto:</b><p>
        {% ifequal tipoadr 'artan_read' %}
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/pro_impacto_an?idArt={{artefacto.id|urlencode}}">Progresivo</a></p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/reg_impacto_an?idArt={{artefacto.id|urlencode}}">Regresivo</a></p>
        {% endifequal %}
        {% ifequal tipoadr 'artdi_read' %}
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/pro_impacto_di?idArt={{artefacto.id|urlencode}}">Progresivo</a></p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/reg_impacto_di?idArt={{artefacto.id|urlencode}}">Regresivo</a></p>
        {% endifequal %}
        {% ifequal tipoadr 'artim_read' %}
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/pro_impacto_im?idArt={{artefacto.id|urlencode}}">Progresivo</a></p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/reg_impacto_im?idArt={{artefacto.id|urlencode}}">Regresivo</a></p>
        {% endifequal %}
    </div>
<p><b>Nombre:</b> {{artefacto.nombre}}</p>
<p><b>Tipo de Artefacto:</b> {{artefacto.tipoArtefacto}}</p>
<p><b>N&uacute;mero:</b> {{artefacto.nro_Artefacto}}</p>
<p><b>Fase:</b> {{artefacto.get_fase_display}}</p>
<p><b>Descripci&oacute;n Breve:</b> {{artefacto.descripcionBreve}}</p>
<p><b>Descripci&oacute;n Detallada:</b> {{artefacto.descripcionDetallada}}</p>
<p><b>Complejidad:</b> {{artefacto.complejidad}}</p>
<p><b>Adjunto:</b> <a href="/adjunto?idadj={{artefacto.adjunto.id}}">{{artefacto.adjunto.nombre}}</a></p>
<p><b>Versi&oacute;n:</b> {{artefacto.version}}</p>
<p><b>&Uacute;ltima modificaci&oacute;n:</b> {{artefacto.fecha|date:"d-M-Y G:i:s"}}</p>
{% ifequal tipoadr 'artan_read' %}
    <p><b>Historial:</b> <a href="/historial_an/?idArt={{artefacto.id|urlencode}}" class="title">ver historial</a></p>
{% endifequal %}
{% ifequal tipoadr 'artdi_read' %}
    <p><b>Historial:</b> <a href="/historial_di/?idArt={{artefacto.id|urlencode}}" class="title">ver historial</a></p>
{% endifequal %}
{% ifequal tipoadr 'artim_read' %}
    <p><b>Historial:</b> <a href="/historial_im/?idArt={{artefacto.id|urlencode}}" class="title">ver historial</a></p>
{% endifequal %}
</div>
</div>
<div class="spoiler">
	<div class="spoiler_title">Relaciones: <input type="button" value="Mostrar"onclick="spoiler(this);" class="sub_btn">
    </div>
    
	<div class="hide">
{% if padre %}
<p><label>Padre:</label>
<a href="/{{tipoadr}}/?idArt={{padre.id|urlencode}}&proyectoname={{proyname|urlencode}}" class="title">
{{ padre.nombre }}</a>
</p>
{% endif %}
{% if artRelHijo %}
<p><label>Hijos:</label></p>
{% include "relhijo_list.html" %}
{% endif %}
{% if artRelPar %}
<p><label>Relaciones con otras fases:</label></p>
{% include "relpar_list.html" %}
{% endif %}
{% if not artRelHijo and not artRelPar and not padre %}
<p>No posee Relaciones</p>
{% endif %}
</div>
</div>
<form action="" method="post">
<br>
	<input  type="hidden" value={{ proyname }} name="proyectoname" />
    <input type="button" name="volver" value="Volver a lista" onClick='location.href="/{{tipoadr}}/?proyectoname={{ proyname|urlencode }}"'>
    
    
</form>

{% endif %}
{% endblock %}
